import { useThemeStore } from '@/store/theme'
import util from '@/utils/index'
class Theme {
	constructor(config = {}) {
	}
	themeClass(className: string) {
		const useStore = useThemeStore()
        var theme = useStore.theme;
		return `ex-ui-${className}${theme ? `--${theme}` : ''}`
	}
	switchTheme(themeName = '') {
		const useStore = useThemeStore()
        useStore.switchTheme(themeName)
		// 存入本地缓存
		util.setStorage('theme', themeName)
	}
}
let theme = new Theme();
export default theme;